home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
SLTPU70C
/
XFORMAT.DOC
< prev
Wrap
Text File
|
1991-03-04
|
4KB
|
92 lines
-------------------------------------
Discussion of File Formats for
SLBBS Upload/Download Temporary Files
(UPLIST.BBS and FILELIST.BBS)
--------------------------------------
Two temporary files called UPLIST.BBS and FILELIST.BBS are created by
Searchlight 2.0 during uploads and downloads, respectively. These files
exist in the SLBBS home directory area. Below we give the formats to these
files, and discuss possible ways in which they may be used by programs.
UPLIST.BBS File
The UPLIST.BBS file consists of a single record (ulisttype) which in
turn contains a count, and an array of subrecords (uspectype):
uspectype = record
name: string[12]; { filename }
descrip: string[40]; { short description }
edescrip: array[1..2] { long description }
of string[60];
end;
uplisttype = record
count: integer;
files: array[1..40] of uspectype;
end;
UPLIST.BBS is a temporary file which is used to contain the filenames
and descriptions - if any - input by a user prior to executing an external
protocol upload. Searchlight rereads this file after the upload and tries
to match the stored filenames to those recorded by the upload procedure.
Upload protocol applications can change the UPLIST.BBS file before
returning to Searchlight. For example, if you install an automatic
procedure to convert ARC files to ZIP, you would want to change the
filenames in the UPLIST.BBS directory so that Searchlight would recognise
the user's description of the file. It would also be possible to add
descriptions for files which lack them, or edit existing descriptions.
Of course, since the UPLIST.BBS file is used only when Searchlight resumes
from an upload, any changes would have to be made by the upload command
itself (or as part of a batch file which calls the upload protocol, then
executes additional programs).
FILELIST.BBS File
The FILELIST.BBS file consists of the single record filelist, which is
made up of a file count, a total file size, and a list of subrecords
containing the data, as follows:
fspectype = record { returned file spec }
name: string[12]; { filename }
length: integer; { size in blocks }
dir: string[12]; { source directory name }
rec: longint; { record # in directory }
romcopy: boolean; { set if file to be copied }
data: dirtypeptr; { pointer: always NIL }
end;
filelist = record
count: integer;
totalsize: longint;
data: array[1..40] of fspectype;
end;
FILELIST.BBS is used by Searchlight to record the names of all files
selected prior to executing an external protocol download command. After
the download completes, Searchlight reads this data back in and uses it to
update the user's total KBytes downloaded, increment the download count for
each selected file, and update the files log.
Searchlight BBS can only detect an error code (success or failure) from
external download protocols, and thus is limited to either recording that
all files or no files were successfully downloaded. However, external
download procedures which want to exert greater control over download
logging can do so by modifying the FILELIST.BBS file prior to returning
control to Searchlight. For example, a DSZ based application could use the
DSZ.LOG file to update the FILELIST.BBS, removing any files which were not
actually transmitted. Server type protocols like Bimodem, which can allow
additional files to be specified for download after a command has begun,
can add the additional files to the FILELIST.BBS before returning.
If you do edit this file, make sure that you update the total size
(which is expressed in 128 byte blocks, ie. 1 = 128 bytes) and be sure that
your procedure ultimately returns an error code of zero to Searchlight.